
import { asyncRoutes } from './routes'

export interface IFMenuBase {
    path: string;
    title: string;
    icon?: string;
    component?: string;
    query?: string;
    requireAuth?: string;
    route?: string;
    login?: boolean; // 是否登录校验，true不进行校验（访客）
    hidden?: boolean; // hidden: true  if set true, item will not show in the sidebar(default is false)
}

export interface IFMenu extends IFMenuBase {
    children?: IFMenu[];
}

// const routesConfig = (asyncRoutes: IFMenu[] | [] | undefined) =>{
    const menu: {
        menus: IFMenu[];
        others: IFMenu[] | [];
        [index: string]: any;
    } = {
    // const menu = {
        menus: asyncRoutes,
        others: [
            { path: '/app/profile', title: '个人中心', icon: 'HomeOutlined', component: 'Profile'},
        ] // 非菜单相关路由
    };
//     return menu;
// }

export default menu;
